<%@ page language="java" import="java.util.*" pageEncoding="UTF-8" contentType="text/html; charset=UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>
  <head>
    <title></title>
	<link rel="stylesheet" type="text/css" href="${path}/css/main.css">
	<link rel="stylesheet" type="text/css" href="${path}/css/mainTable.css">
	<script type="text/javascript">
		function remove(id){
			if(confirm("删除后无法恢复!你确定要删除吗?")){
				var actionUrl = "${path}/limitUserNum/deleteLimitUserNum.action";
				var params = "limitUserNumVo.id="+id;
				params = encodeURI(params);
				params = encodeURI(params);
				window.location.href=actionUrl+'?'+params;
			}
		}
	</script>
  </head>
  <body>
    <div>
    	<c:if test="${limitUserNumVoList == null ||  fn:length(limitUserNumVoList) <= 0}">
    		<p>新增用户拨打次数日限 <a href="${path }/limitUserNum/addLimitUserNum.action" title="添加用户拨打次数日限信息">添加</a></p>
    	</c:if>
    	<div>
    		<table>
    			<thead>
    				<tr>
    					<th>编号</th>
    					<th>拨打次数日限(条)</th>
    					<th>操作</th>
    				</tr>
    			</thead>
    			<c:choose>
    				<c:when test="${limitUserNumVoList != null && fn:length(limitUserNumVoList) > 0}">
    					<c:forEach var="limitUserNumVo" items="${limitUserNumVoList }" varStatus="list">
    						<tr style="${list.index%2 != 0 ? 'background-color: #fea;' : 'background-color: #fff;' }">
    							<td>${limitUserNumVo.id }</td>
    							<td>${limitUserNumVo.day_num }</td>
    							<td>
    								<a href="${path }/limitUserNum/editLimitUserNum.action?limitUserNumVo.id=${limitUserNumVo.id }">修改</a>
    								|
    								<a href="javascript:remove(${limitUserNumVo.id });">删除</a>
    							</td>
    						</tr>
    					</c:forEach>
    				</c:when>
    				<c:otherwise>
    					<tr>
    						<td>暂无用户拨打次数日限配置信息<td>
    					</tr>
    				</c:otherwise>
    			</c:choose>
    		</table>
    	</div>
    </div>
  </body>
</html>
